# Replication document for "Heat Adaptation and Human Performance in a Warming Climate"

## Folder Structure

> Please maintain the folder structure when downloading the replication materials from the Dataverse, because all the code below refers to a path assuming this.

Parent Folder: `JAERE_Submission` 

- `Code` (Coding Scripts. Please see the instruction section below for details.)
- `Data` (Contains the dataset used for analyses.)
- `Results` (Results folder containing regression estimates, figures, and simulations. The baseline folder contains the results in the main manuscript while the robustness folder contains the results in the online appendix.)
  - `Figures` (Figures in the paper)
    - `Baseline`
    - `Robustness`
  - `Regressions` (Regression estimates)
    - `Baseline` 
    - `Robustness`
  - `Simulations` (Simulation results of performance change by the end of century)
    - `Baseline`
    - `Bootstrap`
    - `Robustness`
- `README` (The current opening document)

## Instructions on Coding Scripts

> In each coding script, please specify your local working path to the folder where you store the `JAERE_Submission`  folder. All STATA do files can be executed in STATA version 14.2. 

`Regression_Baseline.do` conducts regression analysis in the baseline setting and generate the results and prerequisite estimates for the following tables and figures.

- Main manuscript
  - Table 1: adaptation from one-week exposure to warm temperatures
  - Figure 1: nonlinear relation between temperature and performance by event type
  - Figure 2: nonlinear relation between temperature and performance by pre-competition temperature
- Online appendix
  - Table A1: classification of track and field events
  - Table A2: summary statistics
  - Table A4: adaptation from one-week exposure by athlete tiers
  - Table A5: acclimatization by week of competition season
  - Table A15: adaptation from one-week exposure in sprint and strength events
  - Figure A8: nonlinear relation between temperature and performance in sprint and strength events

`Regression_Robustness.do` conducts robustness checks for the regression analyses and generate the results and prerequisite estimates for the following tables and figures in the online appendix

- A1.5 Omit control variables
  - Table A9, Figure A4a, A6a
- A1.6 Alternative control for humidity
  - Table A10, Figure A4b, A6b
- A1.7 Define two-week pre-competition exposure period
  - Table A11, A7b
- A1.8 Introduce additional fixed effects
  - Table A12, Figure A4c, A6c
- A1.9 Alternative error structures
  - Figure A5a, Figure A6d
- A1.10 Define exposures by daily maximum temperatures
  - Table A13, Figure A5b, A7a
- A1.11 Omit Temperature Interpolation
  - Table A14, Figure A5c, A7c

`Figure_Baseline.do` generates the figures in the main manuscript.

- Figure 1: Nonlinear Relation between Temperature and Performance by Event Type
- Figure 2: Nonlinear Relation between Temperature and Performance by Pre-competition Temperature Exposure

`Figure_Robustness.do` generates the figures in the online appendix

- Figure A4 & A5: Robustness of Nonlinear Relation between Temperature and Performance by Event Type
- Figure A6 & A7: Robustness of Nonlinear Relation between Temperature and Performance by Pre-competition Temperature Exposure
- Figure A8: Nonlinear Relation Between Temperature and Performance of Sprint and Strength Event Types

`Simulation_Baseline.do` conducts baseline simulation of performance changes by the end of century

- Main manuscript
  - Table 2: Estimated Performance Change by 2100 from RCP8.5 Climate Warming
  - Figure 3: Distribution of Bootstrap Estimates of Mean Performance Losses
- Online appendix
  - Table A3: Semi-Parametric Estimation
  - Figure A3: Predicted Temperature-Performance Relationship in 2-D graph
  - Figure A2: Predicted Temperature-Performance Relationship in 3-D graph

`Simulation_Robustness.do` conducts robustness checks on the simulations and generate the following tables and figures in the online appendix

- Table A6: Estimated Performance Change Under Different Temperature Scenarios
- Table A7: Estimated Performance Change Using Average of Minimum and Maximum of Historical Temperature
- Table A8: Estimated Performance Change using Interpolated Daily Average Temperature Projection
- Figure A1: Distribution of Competition and Training Temperatures

`Plot_3D.R` generates the 3-D graphs in the online appendix

- Figure A2: Predicted Temperature-Performance Relationship in 3-D Graph (Before executing `Plot_3D.R`, please first execute the scripts in the end of `Simulation_Baseline.do` to generate the corresponding data.)

